package com.naiterui.ehp.bs.patient.feign;

import com.naiterui.ehp.bp.bo.consult.VideoConsultBO;
import com.naiterui.ehp.bp.bo.consult.VideoConsultMessageBO;
import com.naiterui.ehp.bp.support.config.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @author luao
 * @date 2021/2/26 11:02 上午
 **/
@FeignClient(name = "videoConsult", url = "${ehp.domain.videoConsult}", configuration = FeignConfiguration.class)
@RequestMapping("/inner/video/consult")
public interface VideoConsultFeignClient {
    @GetMapping("/getVideoConsult")
    VideoConsultBO getVideoConsult(@RequestParam Long patientId, @RequestParam Long doctorId);

    @GetMapping("/getVideoConsultByOrderSn")
    VideoConsultBO getVideoConsultByOrderSn(@RequestParam String orderSn);

    @GetMapping("/getVideoConsultById")
    VideoConsultBO getVideoConsultById(@RequestParam Long videoConsultId);

    @PostMapping("/saveOrUpdate")
    VideoConsultBO saveOrUpdate(@RequestBody VideoConsultBO videoConsultBO);

    @PostMapping("/message/save")
    VideoConsultMessageBO saveVideoConsultMessage(@RequestBody VideoConsultMessageBO videoConsultMessageBO);


    /**
     * 根据医生id和问诊状态获取视频问诊数量
     * @param doctorId
     * @param status
     * @return
     */
    @GetMapping("/status/count")
    Integer getVideoConsultCountByStatus(@RequestParam("doctorId") Long doctorId,@RequestParam("status") Integer status);

}
